package 字符串.左旋转字符串;

/**
 * @author: wh(1835734390 @ qq.com)
 * @date: 2023/1/17 16:26
 * @description:
 * @version:
 */
public class Solution {
    public static void main(String[] args) {
        String s = "lrloseumgh";
        int target = 6;
        System.out.println(reverseLeftWords(s, target));
    }

    public static String reverseLeftWords(String s, int n) {
        StringBuilder sb = new StringBuilder();
        //包括左边界，不包括右界
        sb.append(s.substring(n,s.length()));
        sb.append(s.substring(0,n));
        return String.valueOf(sb);
    }
}
